import request from '@/utils/request'
//1.查询分页数据
export const GetPage = (pageNum, pageSize, data) => {
  return request({
    url: `/admin/product/categoryBrand/page/${pageNum}/${pageSize}`,
    method: 'GET',
    params: data,
  })
}
//删除
export const DeleteById = id => {
  return request({
    url: `/admin/product/categoryBrand/${id}`,
    method: 'delete',
  })
}

//新增
export const Save = data => {
  return request({
    url: `/admin/product/categoryBrand`,
    method: 'post',
    data,
  })
}
//更新
export const UpdateById = data => {
  return request({
    url: `/admin/product/categoryBrand`,
    method: 'put',
    data,
  })
}

//FindBrandByCategoryId根据分类id查询品牌列表(假)
export const FindBrandByCategoryId = categoryId => {
  return request({
    url: `/admin/product/categoryBrand/findBrandByCategoryId/${categoryId}`,
    method: 'get',
  })
}
